﻿@model GameCode.Models.Admin.ImportGameCodeModel
@{
    ViewBag.Title = "游戏特权 - 导入特权码";
    Model.Caption = "导入特权码";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<div class="ui-bar ui-bar-a">
    特权码
</div>
<div class="ui-body ui-body-a">
    @using (Html.BeginForm(new { act = "submit" }))
    {
        @Html.HiddenFor(m => m.ID)
        <div data-role="fieldcontain">
            @Html.LabelFor(m => m.GameName)
            @Html.TextBoxFor(m => m.GameName, new Dict() { "data-mini:true", "disabled" })
            @Html.HiddenFor(m => m.GameName)
        </div>
        <div data-role="fieldcontain">
            @Html.LabelFor(m => m.ProjectName)
            @Html.TextBoxFor(m => m.ProjectName, new Dict() { "data-mini:true", "disabled" })
            @Html.HiddenFor(m => m.ProjectName)
        </div>
        <div data-role="fieldcontain">
            @Html.LabelFor(m => m.Code)
            @Html.TextAreaFor(m => m.Code, new Dict() { "data-mini:true" })
            @Html.ValidationMessageFor(m => m.Code, new { style = "color:Red" })
        </div>
        
        <input type="submit" value="确认" data-inline="true" data-mini="true" />
    }
    @using (Html.BeginForm("ImportGameCodeFile", "Admin", FormMethod.Post, new { enctype = "multipart/form-data", id = "fileForm" }))
    { 
        @Html.HiddenFor(m => m.ID)
        <input type="file" value="导入文件" name="file" data-inline="true" data-mini="true" onchange="$('#fileForm').submit();" />
    }
</div>
